{include file="public/head"}

<body>
<div class="goods-info">
    <div class="goods-left">
        <img src="{$good.image}" alt="..."/>
    </div>
    <div class="goods-right">
        <div class="overflow-two">{$good.good_name}</div>
        <p>{$good.subscription}人已报名</p>
        <i>￥{$ass.a_price}</i>
    </div>
</div>
{eq name="users" value="0"}
            {else/}
<div class="assemble">
    <div class="swiper-container" style="height:200px;">
        <div class="swiper-wrapper">
            
                {volist name="users" id="vo"}
                <div class="swiper-slide">
                    <div class="assemble-item">
                        <img src="{$vo.user.headimgurl}" alt="..."/>
                        <div class="assemble-name overflow-one">{$vo.user.nickname}</div>
                        <div class="assmble-cont">
                            <div class="a-t">还差<i>{$vo.number}人</i>拼团成功</div>
                            <div class="a-f">剩余&nbsp;&nbsp;<div class="t" endTime="{:date('Y-m-d H:i:s',$vo.end_time)}"></div>
                            </div>
                        </div>
                        <a href="/index/assemble/assShare?id={$vo.id}" class="assmble-btn">去参团</a>
                    </div>
                </div>
                {/volist}
            
        </div>
    </div>
</div>
{/eq}
<div class="range">
    <div class="range-h">招生范围</div>
    <div class="range-list">
        {volist name="good.range_id" id="vo"}
        <div class="range-item">{$vo}</div>
        {/volist}
    </div>
</div>
<div class="student">
    <div class="student-h">往期学员</div>
    <div class="student-over">
        <div class="student-list">
            {volist name="good.images" id="vo"}
            <div class="student-item">
                <img src="{$vo}" alt="..." />
            </div>
            {/volist}
        </div>
    </div>
</div>
<a href="http://api.map.baidu.com/marker?location={$good.lat},{$good.lng}&title=位置&content=延长驾校&output=html&src=webapp.baidu.openAPIdemo" class="map">
    <img class="l-img" src="__STATIC__/home/img/image5.png" alt="..."/>
    <p>{$good.address}</p>
    <img class="r-img" src="__STATIC__/home/img/image11.png" alt="..."/>
</a>
<div class="explain">
    <div class="explain-h">产品说明</div>
    <div>{$good.content|raw}</div>
</div>
<div class="careful">
    <div class="careful-h">注意事项</div>
    <div>{$good.note|raw}</div>
</div>
<div style="height: 2rem;"></div>
<div class="footer">
    <div class="phone">
        <a class="flex-center" href="tel: {$tel}">
            <img src="__STATIC__/home/img/image13.png" alt="..."/>
            <i>咨询</i>
        </a>
    </div>
    <a href="/index/goods/userInfo?id={$good.id}" class="alone flex-center">单买<i>￥</i>{$good.price}</a>
    <a href="/index/assemble/userInfo?id={$ass.id}&type=1" class="team flex-center">{$ass.number}人团<i>￥</i>{$ass.a_price}</a>
</div>
<script src="__STATIC__/home/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="__STATIC__/home/js/public.js" type="text/javascript" charset="utf-8"></script>
<script src="__STATIC__/home/js/swiper.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    $(function () {
        // 倒计时
        updateEndTime();

        function updateEndTime() {
            var NowTime = new Date();
            var time = NowTime.getTime();
            $(".assemble-item>.assmble-cont>.a-f > .t").each(function (I) {
                var endDate = this.getAttribute("endTime");
                var endDate1 = eval('new Date(' + endDate.replace(/\d+(?=-[^-]+$)/, function (a) {
                    return parseInt(a, 10) - 1;
                }).match(/\d+/g) + ')');
                var endTime = endDate1.getTime();
                var lag = Math.floor((endTime - time) / 1000);
                //			判断计时是否停止
                if (lag > 0) {
                    var day = Math.floor(lag / (60 * 60 * 24));
                    var h = Math.floor(lag / 3600);
                    var d = Math.floor(h / 24);
                    var m = Math.floor(lag / 60 % 60);
                    var s = lag % 60;
                    $(this).html(h + ":" + m + ":" + s);
                } else {
                    $(this).parent('.a-f').html('拼团已结束');
                }
            });
            setTimeout(function () {
                updateEndTime();
            }, 1000);
        }

        // 倒计时轮播
        var mySwiper = new Swiper('.swiper-container', {
            autoplay: true,
            direction: 'vertical',
            slidesPerView: 3,
            centeredSlides: true,
            loop: true,
        })


    });
</script>
</body>

</html>